package com.shop.czlmshop.controller;

import com.shop.czlmshop.pojo.Category;
import com.shop.czlmshop.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: xmy
 * @Date: 2019-05-05 9:55
 * @Version 1.0
 */
@Controller
public class CategoryController {

    @Autowired
    private CategoryService categoryService;


    @GetMapping("/selCategory")
    @ResponseBody
    public List<Category> selCategory(){
        return categoryService.selCategory();
    }
}

